package com.blog.common.utils;

import com.blog.user.exception.ServiceException;
import org.springframework.util.StringUtils;

/**
 * @ClassName:Asert
 * @Author:wubo
 * @Data:2020/7/28 10:32
 */
public class Assert {
    public static void valid(Object o,String msg){
        if(StringUtils.isEmpty(o)){
            throw new ServiceException(msg);
        }
    }

    public static void decide(int o,String msg){
        if(o==0){
            throw new ServiceException(msg);
        }
    }
}
